package com.ww.util;

/**
 * 自定义json格式返回对象
 */


public class JSONBean {
    //常量
    private static final int SUCCESS=0;
    private static final int FAIL =1;
    private int state;
    private String msg;
    private Object data;

    public void setSuccess(String msg){
        this.state=SUCCESS;
        this.msg=msg;
    }

    public void setFail(String msg){
        this.state=FAIL;
        this.msg=msg;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
